package com.API.dal.entities;

// Generated 03.06.2013 4:15:36 by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Incomes generated by hbm2java
 */
@Entity
@Table(name = "INCOMES", schema = "PUBLIC", catalog = "PUBLIC")
public class Incomes implements java.io.Serializable {

	private Integer id;
	private Date date;
	private BigDecimal total;
	private String notes;
	private Set<IncomesCustomersProjects> incomesCustomersProjectses = new HashSet<IncomesCustomersProjects>(
			0);

	public Incomes() {
	}

	public Incomes(Date date, BigDecimal total) {
		this.date = date;
		this.total = total;
	}

	public Incomes(Date date, BigDecimal total, String notes,
			Set<IncomesCustomersProjects> incomesCustomersProjectses) {
		this.date = date;
		this.total = total;
		this.notes = notes;
		this.incomesCustomersProjectses = incomesCustomersProjectses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date", nullable = false, length = 10)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "TOTAL", nullable = false, precision = 128, scale = 0)
	public BigDecimal getTotal() {
		return this.total;
	}

	public void setTotal(BigDecimal total) {
		this.total = total;
	}

	@Column(name = "NOTES", length = 512)
	public String getNotes() {
		return this.notes;
	}

	public void setNotes(String notes) {
		this.notes = notes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "incomes")
	public Set<IncomesCustomersProjects> getIncomesCustomersProjectses() {
		return this.incomesCustomersProjectses;
	}

	public void setIncomesCustomersProjectses(
			Set<IncomesCustomersProjects> incomesCustomersProjectses) {
		this.incomesCustomersProjectses = incomesCustomersProjectses;
	}

}
